|
tempprobe 2.2.0
|
API for configuring and manipulating Temp Probe Click driver. More...
Topics | |
| Temp Probe Registers List | |
| List of registers of Temp Probe Click driver. | |
| Temp Probe Registers Settings | |
| Settings for registers of Temp Probe Click driver. | |
| Temp Probe MikroBUS Map | |
| MikroBUS pin mapping of Temp Probe Click driver. | |
Functions | |
| void | tempprobe_cfg_setup (tempprobe_cfg_t *cfg) |
| Temp Probe configuration object setup function. | |
| err_t | tempprobe_init (tempprobe_t *ctx, tempprobe_cfg_t *cfg) |
| Temp Probe initialization function. | |
| err_t | tempprobe_default_cfg (tempprobe_t *ctx) |
| Temp Probe default configuration function. | |
| err_t | tempprobe_write_byte (tempprobe_t *ctx, uint16_t reg_addr, uint8_t data_in) |
| Byte Write function. | |
| err_t | tempprobe_write_dword (tempprobe_t *ctx, uint16_t reg_addr, uint32_t data_in) |
| Word Write function. | |
| err_t | tempprobe_read_bytes (tempprobe_t *ctx, uint16_t reg_addr, uint8_t *data_out, uint8_t n_bytes) |
| Byte Read function. | |
| err_t | tempprobe_read_dword (tempprobe_t *ctx, uint16_t reg_addr, uint32_t *data_out) |
| Word Read function. | |
| uint8_t | tempprobe_check_busy (tempprobe_t *ctx) |
| Busy Check function. | |
| void | tempprobe_reset (tempprobe_t *ctx) |
| Reset function. | |
| uint8_t | tempprobe_write_eeprom_data (tempprobe_t *ctx) |
| EEPROM Write function. | |
| uint8_t | tempprobe_read_eeprom_data (tempprobe_t *ctx) |
| EEPROM Read function. | |
| uint8_t | tempprobe_read_temp (tempprobe_t *ctx, uint16_t sel_channel, float *data_out) |
| Temperature Read function. | |
API for configuring and manipulating Temp Probe Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void tempprobe_cfg_setup | ( | tempprobe_cfg_t * | cfg | ) |
Temp Probe configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See tempprobe_cfg_t object definition for detailed explanation. |
| uint8_t tempprobe_check_busy | ( | tempprobe_t * | ctx | ) |
Busy Check function.
Function returns 2 if the device is busy, or 1 if is not (conversion cycle is finished).
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
1 - Conversion cycle is finished, 2 - Busy. | err_t tempprobe_default_cfg | ( | tempprobe_t * | ctx | ) |
Temp Probe default configuration function.
This function executes a default configuration of Temp Probe Click board.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempprobe_init | ( | tempprobe_t * | ctx, |
| tempprobe_cfg_t * | cfg ) |
Temp Probe initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See tempprobe_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t tempprobe_read_bytes | ( | tempprobe_t * | ctx, |
| uint16_t | reg_addr, | ||
| uint8_t * | data_out, | ||
| uint8_t | n_bytes ) |
Byte Read function.
Function reads the desired number of bytes from the registers.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| [in] | reg_addr | : Start address which from byte/bytes be read. |
| [out] | data_out | : Memory where byte/bytes be stored. |
| [in] | n_bytes | : Number of bytes to be read. |
0 - Success, 1 - Wrong address parameter, 2 - Number of bytes is out of range, -1 - Error. | err_t tempprobe_read_dword | ( | tempprobe_t * | ctx, |
| uint16_t | reg_addr, | ||
| uint32_t * | data_out ) |
Word Read function.
Function reads 32-bit data from the registers.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| [in] | reg_addr | : Address which from data be read. |
| [out] | data_out | : Memory where data be stored. |
0 - Success, 1 - Wrong address parameter, -1 - Error. See #err_t definition for detailed explanation. | uint8_t tempprobe_read_eeprom_data | ( | tempprobe_t * | ctx | ) |
EEPROM Read function.
Function reads the memorized settings from the EEPROM memory and writes this settings to the chip configuration registers. Also checks is reading has passed or not.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| uint8_t tempprobe_read_temp | ( | tempprobe_t * | ctx, |
| uint16_t | sel_channel, | ||
| float * | data_out ) |
Temperature Read function.
Function reads temperature data from the desired channel.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| [in] | sel_channel | : Channel which from temperature be read. |
| [out] | data_out | : Memory where temperature data be stored. |
| void tempprobe_reset | ( | tempprobe_t * | ctx | ) |
Reset function.
Function performs the device reset and waits until reset command is finished and the device is ready for ussing.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| err_t tempprobe_write_byte | ( | tempprobe_t * | ctx, |
| uint16_t | reg_addr, | ||
| uint8_t | data_in ) |
Byte Write function.
Function writes one byte data to the register.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| [in] | reg_addr | : Address where byte be written. |
| [in] | data_in | : Data byte to be written. |
0 - Success, 1 - Wrong address parameter, -1 - Error. See #err_t definition for detailed explanation. | err_t tempprobe_write_dword | ( | tempprobe_t * | ctx, |
| uint16_t | reg_addr, | ||
| uint32_t | data_in ) |
Word Write function.
Function writes 32-bit data to the register.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
| [in] | reg_addr | : Address where data be written. |
| [in] | data_in | : 32-bit data to be written. |
0 - Success, 1 - Wrong address parameter, -1 - Error. See #err_t definition for detailed explanation. | uint8_t tempprobe_write_eeprom_data | ( | tempprobe_t * | ctx | ) |
EEPROM Write function.
Function writes the current settings from the chip registers to the EEPROM memory and checks is error occurred.
| [in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |